/// @description Insert description here
// You can write your code in this editor
speed = 0;
if  object_exists(o_Hero)&&point_distance(x, y, Main.x , Main.y)>250  {
direction = point_direction( x, y, Main.x , Main.y);// вычислить направление движения врага к герою
speed = spd;
} else if (point_distance(x, y, Main.x , Main.y)<200){speed = -spd/2;}
kd--;
if (kd <= 0 ){BadShoting(o_blackbullet);kd = 2*fullKd}